﻿
namespace taurus.client
{
    

    /// <summary>
    /// The TObject class.
    /// </summary>
    public interface ITObject
    {
        /// <summary>
        /// The contains key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        bool containsKey(string key);
        /// <summary>
        /// Get bool of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        bool getBool(string key);
        /// <summary>
        /// Get byte of key
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        byte getByte(string key);
        /// <summary>
        /// Get byte array of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        byte[] getByteArray(string key);
        /// <summary>
        /// Get MPDataWrapper of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        TDataWrapper get(string key);
        /// <summary>
        /// Get double of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        double getDouble(string key);
        /// <summary>
        /// Get float of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        float getFloat(string key);
        /// <summary>
        /// Get int of key
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        int getInt(string key);
        /// <summary>
        /// Get all keys.
        /// </summary>
        /// <returns></returns>
        string[] getKeys();
        /// <summary>
        /// Get long of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        long getLong(string key);
        /// <summary>
        /// Get TArray of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        ITArray getTArray(string key);
        /// <summary>
        /// Get TObject of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        ITObject getTObject(string key);
        /// <summary>
        /// Get short of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        short getShort(string key);
        /// <summary>
        /// Get string of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        string getString(string key);
        /// <summary>
        /// Get string of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        string getUtfString(string key);
        /// <summary>
        /// Check null object of key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        bool isNull(string key);
        /// <summary>
        /// Put MPDataWrapper to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void put(string key, TDataWrapper val);
        /// <summary>
        /// Put bool to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putBool(string key, bool val);
        /// <summary>
        /// Put byte to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putByte(string key, byte val);
        /// <summary>
        /// Put byte array to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putByteArray(string key, byte[] val);
        /// <summary>
        /// Put double to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putDouble(string key, double val);
        /// <summary>
        /// Put float to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putFloat(string key, float val);
        /// <summary>
        /// Put int to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putInt(string key, int val);
        /// <summary>
        /// Put long to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putLong(string key, long val);
        /// <summary>
        /// Put null object to key.
        /// </summary>
        /// <param name="key"></param>
        void putNull(string key);
        /// <summary>
        /// Put TArray to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putTArray(string key, ITArray val);
        /// <summary>
        /// Put TObject to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putTObject(string key, ITObject val);
        /// <summary>
        /// Put short to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putShort(string key, short val);
        /// <summary>
        /// Put string to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putString(string key, string val);
        /// <summary>
        /// Put string to key.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="val"></param>
        void putUtfString(string key, string val);
        /// <summary>
        /// Remove objecy of key.
        /// </summary>
        /// <param name="key"></param>
        void del(string key);
        /// <summary>
        /// Get size.
        /// </summary>
        /// <returns></returns>
        int size();
        /// <summary>
        /// The to byte array.
        /// </summary>
        /// <returns></returns>
        ByteArray toBinary();
        /// <summary>
        /// to json
        /// </summary>
        /// <returns></returns>
        string toJson();

    }
}

